.carousel-content {
  background-color: #000;
  padding: 40px 0;
}

.carousel-btn {
  overflow: hidden;
  position: relative;
  display: block;
  width: 160px;
  height: 60px;
  margin: 0 auto;
  padding: 10px 20px;
  color: #399ddf;
  border-radius: 10px;
  z-index: 9;
}

.carousel-btn::before {
  position: absolute;
  left: 50%;
  top: 50%;
  content: '';
  width: 200%;
  height: 200%;
  background-image: linear-gradient(to right, #db0c81, #399ddf, #f60, purple);
  transform-origin: left top;
  animation: rotation 1.5s linear infinite;
  z-index: -2;
}

.carousel-btn::after {
  --w: 2px;
  position: absolute;
  left: var(--w);
  top: var(--w);
  content: '';
  width: calc(100% - 2 * var(--w));
  height: calc(100% - 2 * var(--w));
  background-color: #000;
  z-index: -1;
  border-radius: inherit;
}

@keyframes rotation {
  to {
    transform: rotate(360deg);
  }
}
